/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

import fs from 'fs';

import { EventType } from './event-type.js';

export class FsEvent {
  private readonly name: string;
  private readonly file: string;
  private readonly eventType: EventType;
  private readonly stats: fs.Stats;

  constructor(eventType: EventType, name: string, file: string, stats: fs.Stats) {
    this.eventType = eventType;
    this.name = name;
    this.file = file;
    this.stats = stats;
  }

  getName() {
    return this.name;
  }

  type(): EventType {
    return this.eventType;
  }

  getFile(): string {
    return this.file;
  }

  getStats(): fs.Stats {
    return this.stats;
  }
}
